home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / NCTAudioEditor2 ActiveX DLL / NCTAudioEditor2.exe / {app} / Samples / TestVBAudioEditor2 / frmAdv.frm (.txt) next >
Encoding:
Visual Basic Form  |  2001-02-09  |  3.9 KB  |  101 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form frmAdv 
  4.    Caption         =   "Advanced (Read-Only)"
  5.    ClientHeight    =   930
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5415
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   930
  11.    ScaleWidth      =   5415
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.ComboBox Combo1 
  14.       Height          =   315
  15.       Left            =   90
  16.       Style           =   2  'Dropdown List
  17.       TabIndex        =   2
  18.       Top             =   225
  19.       Width           =   2535
  20.    End
  21.    Begin VB.CheckBox Check1 
  22.       Height          =   315
  23.       Left            =   3195
  24.       TabIndex        =   0
  25.       Top             =   225
  26.       Visible         =   0   'False
  27.       Width           =   1320
  28.    End
  29.    Begin MSComctlLib.Slider Slider1 
  30.       Height          =   495
  31.       Left            =   2835
  32.       TabIndex        =   1
  33.       Top             =   225
  34.       Visible         =   0   'False
  35.       Width           =   2490
  36.       _ExtentX        =   4392
  37.       _ExtentY        =   873
  38.       _Version        =   393216
  39.       Max             =   65535
  40.       TickFrequency   =   6000
  41.    End
  42. Attribute VB_Name = "frmAdv"
  43. Attribute VB_GlobalNameSpace = False
  44. Attribute VB_Creatable = False
  45. Attribute VB_PredeclaredId = True
  46. Attribute VB_Exposed = False
  47. Private Sub Check1_Click()
  48.     Dim Val, Val1
  49.     If Check1.Value = 1 Then Val = True Else Val = False
  50.     If frmDialog.Adv.Text = 1 Then frmDialog.AudioEditor1.srcInputAdvancedValue(Combo1.ListIndex) = Val
  51.     If frmDialog.Adv.Text = 2 Then frmDialog.AudioEditor1.srcOutputAdvancedValue(Combo1.ListIndex) = Val
  52.     If frmDialog.Adv.Text = 1 Then Val1 = frmDialog.AudioEditor1.srcInputAdvancedValue(Combo1.ListIndex)
  53.     If frmDialog.Adv.Text = 2 Then Val1 = frmDialog.AudioEditor1.srcOutputAdvancedValue(Combo1.ListIndex)
  54. '    If Val1 <> 0 Then Check1.Value = 0 Else Check1.Value = 1
  55. End Sub
  56. Private Sub Combo1_Click()
  57.     Dim Val
  58.     If frmDialog.Adv.Text = 1 Then Val = frmDialog.AudioEditor1.srcInputAdvancedValue(Combo1.ListIndex)
  59.     If frmDialog.Adv.Text = 2 Then Val = frmDialog.AudioEditor1.srcOutputAdvancedValue(Combo1.ListIndex)
  60.     If VarType(Val) = vbBoolean Then
  61.         Slider1.Visible = False
  62.         Check1.Visible = True
  63.         Me.Width = 3750
  64.         If Val <> 0 Then Check1.Value = 0 Else Check1.Value = 1
  65.     ElseIf VarType(Val) = vbLong Then
  66.         Slider1.Visible = True
  67.         Check1.Visible = False
  68.         Me.Width = 5520
  69.         Slider1.Value = Abs(Val)
  70.     End If
  71. End Sub
  72. Private Sub Form_Load()
  73.     If frmDialog.Adv.Text = 1 Then SetInput
  74.     If frmDialog.Adv.Text = 2 Then SetOutput
  75. End Sub
  76. Private Sub SetInput()
  77.     Dim i As Integer
  78.     Me.Caption = frmDialog.AudioEditor1.srcInputName & ": Advanced Properties"
  79.     For i = 0 To frmDialog.AudioEditor1.srcInputAdvancedCount
  80.         Combo1.AddItem frmDialog.AudioEditor1.srcInputAdvancedName(i)
  81.     Next i
  82.     Combo1.ListIndex = 0
  83. End Sub
  84. Private Sub SetOutput()
  85.     Dim i As Integer
  86.     Me.Caption = frmDialog.AudioEditor1.srcOutputName & ": Advanced Properties"
  87.     For i = 0 To frmDialog.AudioEditor1.srcOutputAdvancedCount
  88.         Combo1.AddItem frmDialog.AudioEditor1.srcOutputAdvancedName(i)
  89.     Next i
  90.     Combo1.ListIndex = 0
  91. End Sub
  92. Private Sub Slider1_Click()
  93.     Dim Val
  94.     Val = Slider1.Value
  95.     If frmDialog.Adv.Text = 1 Then frmTestVB.AudioRecord1.srcInputAdvancedValue(Combo1.ListIndex) = Val
  96.     If frmDialog.Adv.Text = 2 Then frmTestVB.AudioRecord1.srcOutputAdvancedValue(Combo1.ListIndex) = Val
  97.     If frmDialog.Adv.Text = 1 Then Val = frmDialog.AudioEditor1.srcInputAdvancedValue(Combo1.ListIndex)
  98.     If frmDialog.Adv.Text = 2 Then Val = frmDialog.AudioEditor1.srcOutputAdvancedValue(Combo1.ListIndex)
  99.     Slider1.Value = Abs(Val)
  100. End Sub
  101.